<template>
	<view class='a_mask' v-if="choose">
		<view class="a_box">
			<view class="a_image"><view class="a_text"><text>+{{integerRule || 0}}积分</text></view></view>
			
			<view class="a_btn">
				
				<button class="button-b"  :style="{color:confirmColor}" @click="gettrue()">{{confirmText}}</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			value:{
				default:false,
			},
			title:{
				type:String,
				default:'提示'
			},
			placeholder:{
				type:String,
				default:'请点击输入'
			},
			name:{
				type:String,
				default:'text'
			},
			type:{
				type:String,
				default:'text'
			},
			cancelColor:{
				type:String,
				default:'#999999'
			},
			confirmColor:{
				type:String,
				default:'#FFFFFF'
			},
			cancelText:{
				type:String,
				default:'取消'
			},
			confirmText:{
				type:String,
				default:'完成',
				
			},
			isShow:{
				default:false
			}
		},
		watch:{
			value:function(){
				this.choose = this.value
			}
		},
		data() {
			return {
				choose:false,
				integerRule:""
			};
		},
		mounted:function(){
			this.choose = this.value
			this.getSignRule()
		},
		methods: {
			gettrue:function(){
				this.choose = false
				this.$emit('input',false)
			},
			getSignRule:function(){
					var params = {
						memberId: this.pub.getUserInfo().memberId || "6f6ef90f42dc4ce0b22de319e7adc808",
					}
					this.$postApi(this.$path.GET_INTEGRAL_SIGN, params).then(res => {
						console.log("签到规则返回数据--------------->", res.data)
						if (res.data.success) {
							this.integerRule = res.data.data.integral
						} else {
							
						}
					})
			},
		}
	}
</script>

<style lang="scss">
	.none{
		display: none;
	}
	.a_mask{
		position: fixed;

		background-color: rgba(0,0,0,0.8);
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		z-index: 9999;

		.a_box{
			
			overflow: hidden;
			
			
			border-radius: 10upx;
			position: absolute;
			top: 35%;
			left: 50%;
			transform: translate(-50%,-50%);
			.a_image{
				background: url(../../static/img/mine/congratulation.png) no-repeat;
				background-size: 100% 100%;
				width: 650upx;
				height: 600upx;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			.a_text{
				color: #FE5412;
				margin-top:245upx;
			}
			.a_btn{
				text-align: center;
				font-size: 30upx;
			
				display: flex;
				justify-content: center;
				
				
				button{
					margin-top: -50upx;
					width: 40%;
					background:linear-gradient(90deg,rgba(255,168,41,1),rgba(255,94,4,1));
					font-size: 30upx;
					border-radius: 0upx;
					padding: 0;
					border-radius:41upx;



				}

				
			}
		}
	}
</style>
